package vn.edu.hcmut.cse.ai.search.problems.blocksworld.actiontype;

import vn.edu.hcmut.cse.ai.search.problems.blocksworld.predicate.ArmEmpty;
import vn.edu.hcmut.cse.ai.search.problems.blocksworld.predicate.Holding;
import vn.edu.hcmut.cse.ai.search.problems.blocksworld.predicate.OnTable;

public class Putdown extends UnaryBlocksWorldActionType{

    public Putdown(int block) {
        super(block);
        
        // Precondition list
        Holding holdingPred = new Holding(block);
        this.preConditionList.add(holdingPred);
        
        // Add list
        OnTable onTablePred = new OnTable(block);
        ArmEmpty armEmpty = new ArmEmpty();
        this.addList.add(onTablePred);
        this.addList.add(armEmpty);
                
        // Remove this
        this.removeList.add(holdingPred);
    }
    
    @Override
    public String toString() {
        return "Putdown{" + this.block + '}';
    }
}
